/*
* Copyright 2024 NXP
* NXP Confidential and Proprietary. This software is owned or controlled by NXP and may only be used strictly in
* accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing,
* activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to
* comply with and are bound by, such license terms.  If you do not agree to be bound by the applicable license
* terms, then you may not retain, install, activate or otherwise use the software.
*/

#include "lvgl.h"
#include <stdio.h>
#include "gui_guider.h"
#include "events_init.h"
#include "../custom/custom.h"

#if LV_USE_KEYBOARD
static lv_obj_t * kb;
static void kb_event_cb(lv_obj_t * event_kb, lv_event_t event)
{
	lv_keyboard_def_event_cb(event_kb, event);
	if(event == LV_EVENT_APPLY || event == LV_EVENT_CANCEL){
		lv_obj_set_hidden(event_kb, true);
	}
}

static void text_area_event_cb(lv_obj_t* ta, lv_event_t event)
{
	if (event == LV_EVENT_FOCUSED || event == LV_EVENT_CLICKED)
	{
		lv_keyboard_set_textarea(kb, ta);
		lv_obj_move_foreground(kb);
		lv_obj_set_hidden(kb, false);
	}
	if (event == LV_EVENT_CANCEL || event == LV_EVENT_DEFOCUSED)
	{
		lv_keyboard_set_textarea(kb, NULL);
		lv_obj_move_background(kb);
		lv_obj_set_hidden(kb, true);
	}
}
#endif


void setup_scr_IR_PAGE(lv_ui *ui){
	//Widget: IR_PAGE
	ui->IR_PAGE = lv_obj_create(NULL, NULL);
	kb = lv_keyboard_create(ui->IR_PAGE, NULL);
	lv_obj_set_event_cb(kb, kb_event_cb);
	lv_obj_set_hidden(kb, true);
	lv_obj_set_size(ui->IR_PAGE, 240, 240);

	//Set style for IR_PAGE. Part: LV_OBJ_PART_MAIN, State: LV_STATE_DEFAULT
	static lv_style_t style_IR_PAGE_main_default;
	lv_style_reset(&style_IR_PAGE_main_default);
	lv_style_set_bg_opa(&style_IR_PAGE_main_default, LV_STATE_DEFAULT, 255);
	lv_style_set_bg_color(&style_IR_PAGE_main_default, LV_STATE_DEFAULT, lv_color_hex(0x68CCDE));
	lv_obj_add_style(ui->IR_PAGE, LV_OBJ_PART_MAIN, &style_IR_PAGE_main_default);


	//Widget: IR_PAGE_list_IR
	ui->IR_PAGE_list_IR = lv_list_create(ui->IR_PAGE, NULL);
	ui->IR_PAGE_list_IR_item0 = lv_list_add_btn(ui->IR_PAGE_list_IR, LV_SYMBOL_POWER, "待学习");
	ui->IR_PAGE_list_IR_item1 = lv_list_add_btn(ui->IR_PAGE_list_IR, LV_SYMBOL_POWER, "待学习");
	ui->IR_PAGE_list_IR_item2 = lv_list_add_btn(ui->IR_PAGE_list_IR, LV_SYMBOL_POWER, "待学习");
	ui->IR_PAGE_list_IR_item3 = lv_list_add_btn(ui->IR_PAGE_list_IR, LV_SYMBOL_POWER, "待学习");
	ui->IR_PAGE_list_IR_item4 = lv_list_add_btn(ui->IR_PAGE_list_IR, LV_SYMBOL_POWER, "待学习");
	ui->IR_PAGE_list_IR_item5 = lv_list_add_btn(ui->IR_PAGE_list_IR, LV_SYMBOL_POWER, "待学习");
	ui->IR_PAGE_list_IR_item6 = lv_list_add_btn(ui->IR_PAGE_list_IR, LV_SYMBOL_POWER, "待学习");
	ui->IR_PAGE_list_IR_item7 = lv_list_add_btn(ui->IR_PAGE_list_IR, LV_SYMBOL_POWER, "待学习");
	lv_obj_set_pos(ui->IR_PAGE_list_IR, -4, 66);
	lv_obj_set_size(ui->IR_PAGE_list_IR, 249, 191);

	//Set style for IR_PAGE_list_IR. Part: LV_LIST_PART_BG, State: LV_STATE_DEFAULT
	static lv_style_t style_IR_PAGE_list_IR_bg_default;
	lv_style_reset(&style_IR_PAGE_list_IR_bg_default);
	lv_style_set_shadow_width(&style_IR_PAGE_list_IR_bg_default, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_top(&style_IR_PAGE_list_IR_bg_default, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_left(&style_IR_PAGE_list_IR_bg_default, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_right(&style_IR_PAGE_list_IR_bg_default, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_bottom(&style_IR_PAGE_list_IR_bg_default, LV_STATE_DEFAULT, 0);
	lv_style_set_border_width(&style_IR_PAGE_list_IR_bg_default, LV_STATE_DEFAULT, 1);
	lv_style_set_border_opa(&style_IR_PAGE_list_IR_bg_default, LV_STATE_DEFAULT, 0);
	lv_style_set_border_color(&style_IR_PAGE_list_IR_bg_default, LV_STATE_DEFAULT, lv_color_hex(0xe1e6ee));
	lv_style_set_radius(&style_IR_PAGE_list_IR_bg_default, LV_STATE_DEFAULT, 3);
	lv_obj_add_style(ui->IR_PAGE_list_IR, LV_LIST_PART_BG, &style_IR_PAGE_list_IR_bg_default);

	//Set style for IR_PAGE_list_IR. Part: LV_LIST_PART_BG, State: LV_STATE_FOCUSED
	static lv_style_t style_IR_PAGE_list_IR_bg_focused;
	lv_style_reset(&style_IR_PAGE_list_IR_bg_focused);
	lv_style_set_shadow_width(&style_IR_PAGE_list_IR_bg_focused, LV_STATE_FOCUSED, 0);
	lv_style_set_pad_top(&style_IR_PAGE_list_IR_bg_focused, LV_STATE_FOCUSED, 5);
	lv_style_set_pad_left(&style_IR_PAGE_list_IR_bg_focused, LV_STATE_FOCUSED, 5);
	lv_style_set_pad_right(&style_IR_PAGE_list_IR_bg_focused, LV_STATE_FOCUSED, 5);
	lv_style_set_pad_bottom(&style_IR_PAGE_list_IR_bg_focused, LV_STATE_FOCUSED, 5);
	lv_style_set_border_width(&style_IR_PAGE_list_IR_bg_focused, LV_STATE_FOCUSED, 1);
	lv_style_set_border_opa(&style_IR_PAGE_list_IR_bg_focused, LV_STATE_FOCUSED, 0);
	lv_style_set_border_color(&style_IR_PAGE_list_IR_bg_focused, LV_STATE_FOCUSED, lv_color_hex(0xe1e6ee));
	lv_style_set_radius(&style_IR_PAGE_list_IR_bg_focused, LV_STATE_FOCUSED, 3);
	lv_obj_add_style(ui->IR_PAGE_list_IR, LV_LIST_PART_BG, &style_IR_PAGE_list_IR_bg_focused);

	//Set style for IR_PAGE_list_IR. Part: LV_LIST_PART_BG, State: LV_STATE_DISABLED
	static lv_style_t style_IR_PAGE_list_IR_bg_disabled;
	lv_style_reset(&style_IR_PAGE_list_IR_bg_disabled);
	lv_style_set_shadow_width(&style_IR_PAGE_list_IR_bg_disabled, LV_STATE_DISABLED, 0);
	lv_style_set_pad_top(&style_IR_PAGE_list_IR_bg_disabled, LV_STATE_DISABLED, 5);
	lv_style_set_pad_left(&style_IR_PAGE_list_IR_bg_disabled, LV_STATE_DISABLED, 5);
	lv_style_set_pad_right(&style_IR_PAGE_list_IR_bg_disabled, LV_STATE_DISABLED, 5);
	lv_style_set_pad_bottom(&style_IR_PAGE_list_IR_bg_disabled, LV_STATE_DISABLED, 5);
	lv_style_set_border_width(&style_IR_PAGE_list_IR_bg_disabled, LV_STATE_DISABLED, 1);
	lv_style_set_border_opa(&style_IR_PAGE_list_IR_bg_disabled, LV_STATE_DISABLED, 0);
	lv_style_set_border_color(&style_IR_PAGE_list_IR_bg_disabled, LV_STATE_DISABLED, lv_color_hex(0xe1e6ee));
	lv_style_set_radius(&style_IR_PAGE_list_IR_bg_disabled, LV_STATE_DISABLED, 3);
	lv_obj_add_style(ui->IR_PAGE_list_IR, LV_LIST_PART_BG, &style_IR_PAGE_list_IR_bg_disabled);

	//Set style for IR_PAGE_list_IR. Part: LV_LIST_PART_SCROLLABLE, State: LV_STATE_DEFAULT
	static lv_style_t style_IR_PAGE_list_IR_scrollable_default;
	lv_style_reset(&style_IR_PAGE_list_IR_scrollable_default);
	lv_style_set_radius(&style_IR_PAGE_list_IR_scrollable_default, LV_STATE_DEFAULT, 3);
	lv_style_set_bg_opa(&style_IR_PAGE_list_IR_scrollable_default, LV_STATE_DEFAULT, 255);
	lv_style_set_bg_color(&style_IR_PAGE_list_IR_scrollable_default, LV_STATE_DEFAULT, lv_color_hex(0x68CCDE));
	lv_style_set_bg_grad_dir(&style_IR_PAGE_list_IR_scrollable_default, LV_STATE_DEFAULT, LV_GRAD_DIR_VER);
	lv_style_set_bg_main_stop(&style_IR_PAGE_list_IR_scrollable_default, LV_STATE_DEFAULT, 0);
	lv_style_set_bg_grad_stop(&style_IR_PAGE_list_IR_scrollable_default, LV_STATE_DEFAULT, 226);
	lv_style_set_bg_grad_color(&style_IR_PAGE_list_IR_scrollable_default, LV_STATE_DEFAULT, lv_color_hex(0xB068DE));
	lv_obj_add_style(ui->IR_PAGE_list_IR, LV_LIST_PART_SCROLLABLE, &style_IR_PAGE_list_IR_scrollable_default);

	//Set style for IR_PAGE_list_IR child items. Part: LV_BTN_PART_MAIN, State: LV_STATE_DEFAULT
	static lv_style_t style_IR_PAGE_list_IR_main_default_child;
	lv_style_reset(&style_IR_PAGE_list_IR_main_default_child);
	lv_style_set_text_color(&style_IR_PAGE_list_IR_main_default_child, LV_STATE_DEFAULT, lv_color_hex(0x0D3055));
	lv_style_set_text_font(&style_IR_PAGE_list_IR_main_default_child, LV_STATE_DEFAULT, &lv_font_song_13);
	lv_style_set_radius(&style_IR_PAGE_list_IR_main_default_child, LV_STATE_DEFAULT, 3);
	lv_style_set_pad_top(&style_IR_PAGE_list_IR_main_default_child, LV_STATE_DEFAULT, 5);
	lv_style_set_pad_left(&style_IR_PAGE_list_IR_main_default_child, LV_STATE_DEFAULT, 5);
	lv_style_set_pad_right(&style_IR_PAGE_list_IR_main_default_child, LV_STATE_DEFAULT, 5);
	lv_style_set_pad_bottom(&style_IR_PAGE_list_IR_main_default_child, LV_STATE_DEFAULT, 5);
	lv_style_set_bg_opa(&style_IR_PAGE_list_IR_main_default_child, LV_STATE_DEFAULT, 31);
	lv_style_set_bg_color(&style_IR_PAGE_list_IR_main_default_child, LV_STATE_DEFAULT, lv_color_hex(0xffffff));
	lv_obj_add_style(ui->IR_PAGE_list_IR_item0, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_default_child);
	lv_obj_add_style(ui->IR_PAGE_list_IR_item1, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_default_child);
	lv_obj_add_style(ui->IR_PAGE_list_IR_item2, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_default_child);
	lv_obj_add_style(ui->IR_PAGE_list_IR_item3, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_default_child);
	lv_obj_add_style(ui->IR_PAGE_list_IR_item4, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_default_child);
	lv_obj_add_style(ui->IR_PAGE_list_IR_item5, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_default_child);
	lv_obj_add_style(ui->IR_PAGE_list_IR_item6, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_default_child);
	lv_obj_add_style(ui->IR_PAGE_list_IR_item7, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_default_child);
	

	//Set style for IR_PAGE_list_IR child items. Part: LV_BTN_PART_MAIN, State: LV_STATE_PRESSED
	static lv_style_t style_IR_PAGE_list_IR_main_pressed_child;
	lv_style_reset(&style_IR_PAGE_list_IR_main_pressed_child);
	lv_style_set_radius(&style_IR_PAGE_list_IR_main_pressed_child, LV_STATE_PRESSED, 3);
	lv_style_set_text_color(&style_IR_PAGE_list_IR_main_pressed_child, LV_STATE_PRESSED, lv_color_hex(0x0D3055));
	lv_style_set_text_font(&style_IR_PAGE_list_IR_main_pressed_child, LV_STATE_PRESSED, &lv_font_song_13);
	lv_style_set_pad_top(&style_IR_PAGE_list_IR_main_pressed_child, LV_STATE_PRESSED, 5);
	lv_style_set_pad_left(&style_IR_PAGE_list_IR_main_pressed_child, LV_STATE_PRESSED, 5);
	lv_style_set_pad_right(&style_IR_PAGE_list_IR_main_pressed_child, LV_STATE_PRESSED, 5);
	lv_style_set_pad_bottom(&style_IR_PAGE_list_IR_main_pressed_child, LV_STATE_PRESSED, 5);
	lv_style_set_bg_opa(&style_IR_PAGE_list_IR_main_pressed_child, LV_STATE_PRESSED, 255);
	lv_style_set_bg_color(&style_IR_PAGE_list_IR_main_pressed_child, LV_STATE_PRESSED, lv_color_hex(0xffffff));
	lv_obj_add_style(ui->IR_PAGE_list_IR_item0, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_pressed_child);
	lv_obj_add_style(ui->IR_PAGE_list_IR_item1, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_pressed_child);
	lv_obj_add_style(ui->IR_PAGE_list_IR_item2, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_pressed_child);
	lv_obj_add_style(ui->IR_PAGE_list_IR_item3, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_pressed_child);
	lv_obj_add_style(ui->IR_PAGE_list_IR_item4, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_pressed_child);
	lv_obj_add_style(ui->IR_PAGE_list_IR_item5, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_pressed_child);
	lv_obj_add_style(ui->IR_PAGE_list_IR_item6, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_pressed_child);
	lv_obj_add_style(ui->IR_PAGE_list_IR_item7, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_pressed_child);
	

	//Set style for IR_PAGE_list_IR child items. Part: LV_BTN_PART_MAIN, State: LV_STATE_FOCUSED
	static lv_style_t style_IR_PAGE_list_IR_main_focused_child;
	lv_style_reset(&style_IR_PAGE_list_IR_main_focused_child);
	lv_style_set_radius(&style_IR_PAGE_list_IR_main_focused_child, LV_STATE_FOCUSED, 3);
	lv_style_set_text_color(&style_IR_PAGE_list_IR_main_focused_child, LV_STATE_FOCUSED, lv_color_hex(0x0D3055));
	lv_style_set_text_font(&style_IR_PAGE_list_IR_main_focused_child, LV_STATE_FOCUSED, &lv_font_song_13);
	lv_style_set_pad_top(&style_IR_PAGE_list_IR_main_focused_child, LV_STATE_FOCUSED, 5);
	lv_style_set_pad_left(&style_IR_PAGE_list_IR_main_focused_child, LV_STATE_FOCUSED, 5);
	lv_style_set_pad_right(&style_IR_PAGE_list_IR_main_focused_child, LV_STATE_FOCUSED, 5);
	lv_style_set_pad_bottom(&style_IR_PAGE_list_IR_main_focused_child, LV_STATE_FOCUSED, 5);
	lv_style_set_bg_opa(&style_IR_PAGE_list_IR_main_focused_child, LV_STATE_FOCUSED, 239);
	lv_style_set_bg_color(&style_IR_PAGE_list_IR_main_focused_child, LV_STATE_FOCUSED, lv_color_hex(0xffffff));
	lv_obj_add_style(ui->IR_PAGE_list_IR_item0, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_focused_child);
	lv_obj_add_style(ui->IR_PAGE_list_IR_item1, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_focused_child);
	lv_obj_add_style(ui->IR_PAGE_list_IR_item2, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_focused_child);
	lv_obj_add_style(ui->IR_PAGE_list_IR_item3, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_focused_child);
	lv_obj_add_style(ui->IR_PAGE_list_IR_item4, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_focused_child);
	lv_obj_add_style(ui->IR_PAGE_list_IR_item5, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_focused_child);
	lv_obj_add_style(ui->IR_PAGE_list_IR_item6, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_focused_child);
	lv_obj_add_style(ui->IR_PAGE_list_IR_item7, LV_BTN_PART_MAIN, &style_IR_PAGE_list_IR_main_focused_child);
	


	//Widget: IR_PAGE_ICON_SEND
	ui->IR_PAGE_ICON_SEND = lv_imgbtn_create(ui->IR_PAGE, NULL);
	lv_imgbtn_set_checkable(ui->IR_PAGE_ICON_SEND, true);
	lv_imgbtn_set_src(ui->IR_PAGE_ICON_SEND, LV_BTN_STATE_RELEASED, &_IR_RE_alpha_40x40);
	lv_imgbtn_set_src(ui->IR_PAGE_ICON_SEND, LV_BTN_STATE_PRESSED, &_IR_RE1_alpha_40x40);
	ui->IR_PAGE_ICON_SEND_label = lv_label_create(ui->IR_PAGE_ICON_SEND, NULL);
	lv_label_set_text(ui->IR_PAGE_ICON_SEND_label, "");
	lv_label_set_align(ui->IR_PAGE_ICON_SEND_label, LV_LABEL_ALIGN_CENTER);
	lv_obj_set_pos(ui->IR_PAGE_ICON_SEND, 182, 3);
	lv_obj_set_size(ui->IR_PAGE_ICON_SEND, 40, 40);

	//Set style for IR_PAGE_ICON_SEND. Part: LV_IMGBTN_PART_MAIN, State: LV_STATE_DEFAULT
	static lv_style_t style_IR_PAGE_ICON_SEND_main_default;
	lv_style_reset(&style_IR_PAGE_ICON_SEND_main_default);
	lv_style_set_shadow_width(&style_IR_PAGE_ICON_SEND_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_image_opa(&style_IR_PAGE_ICON_SEND_main_default, LV_STATE_DEFAULT, 255);
	lv_style_set_text_color(&style_IR_PAGE_ICON_SEND_main_default, LV_STATE_DEFAULT, lv_color_hex(0x000000));
	lv_style_set_text_font(&style_IR_PAGE_ICON_SEND_main_default, LV_STATE_DEFAULT, &lv_font_song_13);
	lv_obj_add_style(ui->IR_PAGE_ICON_SEND, LV_IMGBTN_PART_MAIN, &style_IR_PAGE_ICON_SEND_main_default);

	//Set style for IR_PAGE_ICON_SEND. Part: LV_IMGBTN_PART_MAIN, State: LV_STATE_PRESSED
	static lv_style_t style_IR_PAGE_ICON_SEND_main_pressed;
	lv_style_reset(&style_IR_PAGE_ICON_SEND_main_pressed);
	lv_style_set_shadow_width(&style_IR_PAGE_ICON_SEND_main_pressed, LV_STATE_PRESSED, 0);
	lv_style_set_text_color(&style_IR_PAGE_ICON_SEND_main_pressed, LV_STATE_PRESSED, lv_color_hex(0xFF33FF));
	lv_style_set_text_font(&style_IR_PAGE_ICON_SEND_main_pressed, LV_STATE_PRESSED, &lv_font_song_13);
	lv_obj_add_style(ui->IR_PAGE_ICON_SEND, LV_IMGBTN_PART_MAIN, &style_IR_PAGE_ICON_SEND_main_pressed);

	//Set style for IR_PAGE_ICON_SEND. Part: LV_IMGBTN_PART_MAIN, State: LV_STATE_CHECKED
	static lv_style_t style_IR_PAGE_ICON_SEND_main_checked;
	lv_style_reset(&style_IR_PAGE_ICON_SEND_main_checked);
	lv_style_set_shadow_width(&style_IR_PAGE_ICON_SEND_main_checked, LV_STATE_CHECKED, 0);
	lv_style_set_text_color(&style_IR_PAGE_ICON_SEND_main_checked, LV_STATE_CHECKED, lv_color_hex(0xFF33FF));
	lv_style_set_text_font(&style_IR_PAGE_ICON_SEND_main_checked, LV_STATE_CHECKED, &lv_font_song_13);
	lv_obj_add_style(ui->IR_PAGE_ICON_SEND, LV_IMGBTN_PART_MAIN, &style_IR_PAGE_ICON_SEND_main_checked);


	//Widget: IR_PAGE_ICON_REC
	ui->IR_PAGE_ICON_REC = lv_imgbtn_create(ui->IR_PAGE, NULL);
	lv_imgbtn_set_checkable(ui->IR_PAGE_ICON_REC, true);
	lv_imgbtn_set_src(ui->IR_PAGE_ICON_REC, LV_BTN_STATE_RELEASED, &_IR_SEND_alpha_40x40);
	lv_imgbtn_set_src(ui->IR_PAGE_ICON_REC, LV_BTN_STATE_PRESSED, &_IR_SEND1_alpha_40x40);
	ui->IR_PAGE_ICON_REC_label = lv_label_create(ui->IR_PAGE_ICON_REC, NULL);
	lv_label_set_text(ui->IR_PAGE_ICON_REC_label, "");
	lv_label_set_align(ui->IR_PAGE_ICON_REC_label, LV_LABEL_ALIGN_CENTER);
	lv_obj_set_pos(ui->IR_PAGE_ICON_REC, 27, 3);
	lv_obj_set_size(ui->IR_PAGE_ICON_REC, 40, 40);

	//Set style for IR_PAGE_ICON_REC. Part: LV_IMGBTN_PART_MAIN, State: LV_STATE_DEFAULT
	static lv_style_t style_IR_PAGE_ICON_REC_main_default;
	lv_style_reset(&style_IR_PAGE_ICON_REC_main_default);
	lv_style_set_text_color(&style_IR_PAGE_ICON_REC_main_default, LV_STATE_DEFAULT, lv_color_hex(0x000000));
	lv_style_set_text_font(&style_IR_PAGE_ICON_REC_main_default, LV_STATE_DEFAULT, &lv_font_song_13);
	lv_style_set_shadow_width(&style_IR_PAGE_ICON_REC_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_image_opa(&style_IR_PAGE_ICON_REC_main_default, LV_STATE_DEFAULT, 255);
	lv_obj_add_style(ui->IR_PAGE_ICON_REC, LV_IMGBTN_PART_MAIN, &style_IR_PAGE_ICON_REC_main_default);

	//Set style for IR_PAGE_ICON_REC. Part: LV_IMGBTN_PART_MAIN, State: LV_STATE_PRESSED
	static lv_style_t style_IR_PAGE_ICON_REC_main_pressed;
	lv_style_reset(&style_IR_PAGE_ICON_REC_main_pressed);
	lv_style_set_text_color(&style_IR_PAGE_ICON_REC_main_pressed, LV_STATE_PRESSED, lv_color_hex(0xFF33FF));
	lv_style_set_text_font(&style_IR_PAGE_ICON_REC_main_pressed, LV_STATE_PRESSED, &lv_font_song_13);
	lv_style_set_shadow_width(&style_IR_PAGE_ICON_REC_main_pressed, LV_STATE_PRESSED, 0);
	lv_obj_add_style(ui->IR_PAGE_ICON_REC, LV_IMGBTN_PART_MAIN, &style_IR_PAGE_ICON_REC_main_pressed);

	//Set style for IR_PAGE_ICON_REC. Part: LV_IMGBTN_PART_MAIN, State: LV_STATE_CHECKED
	static lv_style_t style_IR_PAGE_ICON_REC_main_checked;
	lv_style_reset(&style_IR_PAGE_ICON_REC_main_checked);
	lv_style_set_text_color(&style_IR_PAGE_ICON_REC_main_checked, LV_STATE_CHECKED, lv_color_hex(0xFF33FF));
	lv_style_set_text_font(&style_IR_PAGE_ICON_REC_main_checked, LV_STATE_CHECKED, &lv_font_song_13);
	lv_style_set_shadow_width(&style_IR_PAGE_ICON_REC_main_checked, LV_STATE_CHECKED, 0);
	lv_obj_add_style(ui->IR_PAGE_ICON_REC, LV_IMGBTN_PART_MAIN, &style_IR_PAGE_ICON_REC_main_checked);


	//Widget: IR_PAGE_double_learn
	ui->IR_PAGE_double_learn = lv_label_create(ui->IR_PAGE, NULL);
	lv_label_set_text(ui->IR_PAGE_double_learn, "双击学习");
	lv_label_set_align(ui->IR_PAGE_double_learn, LV_LABEL_ALIGN_CENTER);
	lv_obj_set_pos(ui->IR_PAGE_double_learn, 17, 43);
	lv_obj_set_width(ui->IR_PAGE_double_learn, 60);

	//Set style for IR_PAGE_double_learn. Part: LV_LABEL_PART_MAIN, State: LV_STATE_DEFAULT
	static lv_style_t style_IR_PAGE_double_learn_main_default;
	lv_style_reset(&style_IR_PAGE_double_learn_main_default);
	lv_style_set_text_color(&style_IR_PAGE_double_learn_main_default, LV_STATE_DEFAULT, lv_color_hex(0x000000));
	lv_style_set_text_font(&style_IR_PAGE_double_learn_main_default, LV_STATE_DEFAULT, &lv_font_song_13);
	lv_style_set_text_letter_space(&style_IR_PAGE_double_learn_main_default, LV_STATE_DEFAULT, 2);
	lv_style_set_text_line_space(&style_IR_PAGE_double_learn_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_shadow_width(&style_IR_PAGE_double_learn_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_radius(&style_IR_PAGE_double_learn_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_bg_opa(&style_IR_PAGE_double_learn_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_top(&style_IR_PAGE_double_learn_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_right(&style_IR_PAGE_double_learn_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_bottom(&style_IR_PAGE_double_learn_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_left(&style_IR_PAGE_double_learn_main_default, LV_STATE_DEFAULT, 0);
	lv_obj_add_style(ui->IR_PAGE_double_learn, LV_LABEL_PART_MAIN, &style_IR_PAGE_double_learn_main_default);


	//Widget: IR_PAGE_long_send
	ui->IR_PAGE_long_send = lv_label_create(ui->IR_PAGE, NULL);
	lv_label_set_text(ui->IR_PAGE_long_send, "双击发射");
	lv_label_set_align(ui->IR_PAGE_long_send, LV_LABEL_ALIGN_CENTER);
	lv_obj_set_pos(ui->IR_PAGE_long_send, 172, 43);
	lv_obj_set_width(ui->IR_PAGE_long_send, 60);

	//Set style for IR_PAGE_long_send. Part: LV_LABEL_PART_MAIN, State: LV_STATE_DEFAULT
	static lv_style_t style_IR_PAGE_long_send_main_default;
	lv_style_reset(&style_IR_PAGE_long_send_main_default);
	lv_style_set_text_color(&style_IR_PAGE_long_send_main_default, LV_STATE_DEFAULT, lv_color_hex(0x000000));
	lv_style_set_text_font(&style_IR_PAGE_long_send_main_default, LV_STATE_DEFAULT, &lv_font_song_13);
	lv_style_set_text_letter_space(&style_IR_PAGE_long_send_main_default, LV_STATE_DEFAULT, 2);
	lv_style_set_text_line_space(&style_IR_PAGE_long_send_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_shadow_width(&style_IR_PAGE_long_send_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_radius(&style_IR_PAGE_long_send_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_bg_opa(&style_IR_PAGE_long_send_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_top(&style_IR_PAGE_long_send_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_right(&style_IR_PAGE_long_send_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_bottom(&style_IR_PAGE_long_send_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_left(&style_IR_PAGE_long_send_main_default, LV_STATE_DEFAULT, 0);
	lv_obj_add_style(ui->IR_PAGE_long_send, LV_LABEL_PART_MAIN, &style_IR_PAGE_long_send_main_default);


	//Widget: IR_PAGE_ICON_BACK
	ui->IR_PAGE_ICON_BACK = lv_imgbtn_create(ui->IR_PAGE, NULL);
	lv_imgbtn_set_checkable(ui->IR_PAGE_ICON_BACK, true);
	lv_imgbtn_set_src(ui->IR_PAGE_ICON_BACK, LV_BTN_STATE_RELEASED, &_return_alpha_40x40);
	lv_imgbtn_set_src(ui->IR_PAGE_ICON_BACK, LV_BTN_STATE_PRESSED, &_return1_alpha_40x40);
	ui->IR_PAGE_ICON_BACK_label = lv_label_create(ui->IR_PAGE_ICON_BACK, NULL);
	lv_label_set_text(ui->IR_PAGE_ICON_BACK_label, "");
	lv_label_set_align(ui->IR_PAGE_ICON_BACK_label, LV_LABEL_ALIGN_CENTER);
	lv_obj_set_pos(ui->IR_PAGE_ICON_BACK, 100, 2);
	lv_obj_set_size(ui->IR_PAGE_ICON_BACK, 40, 40);

	//Set style for IR_PAGE_ICON_BACK. Part: LV_IMGBTN_PART_MAIN, State: LV_STATE_DEFAULT
	static lv_style_t style_IR_PAGE_ICON_BACK_main_default;
	lv_style_reset(&style_IR_PAGE_ICON_BACK_main_default);
	lv_style_set_text_color(&style_IR_PAGE_ICON_BACK_main_default, LV_STATE_DEFAULT, lv_color_hex(0x000000));
	lv_style_set_text_font(&style_IR_PAGE_ICON_BACK_main_default, LV_STATE_DEFAULT, &lv_font_song_13);
	lv_style_set_shadow_width(&style_IR_PAGE_ICON_BACK_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_image_opa(&style_IR_PAGE_ICON_BACK_main_default, LV_STATE_DEFAULT, 255);
	lv_obj_add_style(ui->IR_PAGE_ICON_BACK, LV_IMGBTN_PART_MAIN, &style_IR_PAGE_ICON_BACK_main_default);

	//Set style for IR_PAGE_ICON_BACK. Part: LV_IMGBTN_PART_MAIN, State: LV_STATE_PRESSED
	static lv_style_t style_IR_PAGE_ICON_BACK_main_pressed;
	lv_style_reset(&style_IR_PAGE_ICON_BACK_main_pressed);
	lv_style_set_text_color(&style_IR_PAGE_ICON_BACK_main_pressed, LV_STATE_PRESSED, lv_color_hex(0xFF33FF));
	lv_style_set_text_font(&style_IR_PAGE_ICON_BACK_main_pressed, LV_STATE_PRESSED, &lv_font_song_13);
	lv_style_set_shadow_width(&style_IR_PAGE_ICON_BACK_main_pressed, LV_STATE_PRESSED, 0);
	lv_obj_add_style(ui->IR_PAGE_ICON_BACK, LV_IMGBTN_PART_MAIN, &style_IR_PAGE_ICON_BACK_main_pressed);

	//Set style for IR_PAGE_ICON_BACK. Part: LV_IMGBTN_PART_MAIN, State: LV_STATE_CHECKED
	static lv_style_t style_IR_PAGE_ICON_BACK_main_checked;
	lv_style_reset(&style_IR_PAGE_ICON_BACK_main_checked);
	lv_style_set_text_color(&style_IR_PAGE_ICON_BACK_main_checked, LV_STATE_CHECKED, lv_color_hex(0xFF33FF));
	lv_style_set_text_font(&style_IR_PAGE_ICON_BACK_main_checked, LV_STATE_CHECKED, &lv_font_song_13);
	lv_style_set_shadow_width(&style_IR_PAGE_ICON_BACK_main_checked, LV_STATE_CHECKED, 0);
	lv_obj_add_style(ui->IR_PAGE_ICON_BACK, LV_IMGBTN_PART_MAIN, &style_IR_PAGE_ICON_BACK_main_checked);


	//Widget: IR_PAGE_label_1
	ui->IR_PAGE_label_1 = lv_label_create(ui->IR_PAGE, NULL);
	lv_label_set_text(ui->IR_PAGE_label_1, "双击退出");
	lv_label_set_align(ui->IR_PAGE_label_1, LV_LABEL_ALIGN_CENTER);
	lv_obj_set_pos(ui->IR_PAGE_label_1, 92, 43);
	lv_obj_set_width(ui->IR_PAGE_label_1, 60);

	//Set style for IR_PAGE_label_1. Part: LV_LABEL_PART_MAIN, State: LV_STATE_DEFAULT
	static lv_style_t style_IR_PAGE_label_1_main_default;
	lv_style_reset(&style_IR_PAGE_label_1_main_default);
	lv_style_set_shadow_width(&style_IR_PAGE_label_1_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_radius(&style_IR_PAGE_label_1_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_bg_opa(&style_IR_PAGE_label_1_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_text_color(&style_IR_PAGE_label_1_main_default, LV_STATE_DEFAULT, lv_color_hex(0x000000));
	lv_style_set_text_font(&style_IR_PAGE_label_1_main_default, LV_STATE_DEFAULT, &lv_font_song_13);
	lv_style_set_text_letter_space(&style_IR_PAGE_label_1_main_default, LV_STATE_DEFAULT, 2);
	lv_style_set_text_line_space(&style_IR_PAGE_label_1_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_top(&style_IR_PAGE_label_1_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_right(&style_IR_PAGE_label_1_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_bottom(&style_IR_PAGE_label_1_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_left(&style_IR_PAGE_label_1_main_default, LV_STATE_DEFAULT, 0);
	lv_obj_add_style(ui->IR_PAGE_label_1, LV_LABEL_PART_MAIN, &style_IR_PAGE_label_1_main_default);


	//Widget: IR_PAGE_cont_1
	ui->IR_PAGE_cont_1 = lv_cont_create(ui->IR_PAGE, NULL);
	lv_obj_set_click(ui->IR_PAGE_cont_1, false);
	lv_cont_set_layout(ui->IR_PAGE_cont_1, LV_LAYOUT_OFF);
	lv_cont_set_fit(ui->IR_PAGE_cont_1, LV_FIT_NONE);
	lv_obj_set_pos(ui->IR_PAGE_cont_1, 0, 0);
	lv_obj_set_size(ui->IR_PAGE_cont_1, 240, 240);
	lv_obj_set_hidden(ui->IR_PAGE_cont_1, true);

	//Set style for IR_PAGE_cont_1. Part: LV_CONT_PART_MAIN, State: LV_STATE_DEFAULT
	static lv_style_t style_IR_PAGE_cont_1_main_default;
	lv_style_reset(&style_IR_PAGE_cont_1_main_default);
	lv_style_set_shadow_width(&style_IR_PAGE_cont_1_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_radius(&style_IR_PAGE_cont_1_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_bg_opa(&style_IR_PAGE_cont_1_main_default, LV_STATE_DEFAULT, 255);
	lv_style_set_bg_color(&style_IR_PAGE_cont_1_main_default, LV_STATE_DEFAULT, lv_color_hex(0x68CCED));
	lv_style_set_bg_grad_dir(&style_IR_PAGE_cont_1_main_default, LV_STATE_DEFAULT, LV_GRAD_DIR_VER);
	lv_style_set_bg_main_stop(&style_IR_PAGE_cont_1_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_bg_grad_stop(&style_IR_PAGE_cont_1_main_default, LV_STATE_DEFAULT, 255);
	lv_style_set_bg_grad_color(&style_IR_PAGE_cont_1_main_default, LV_STATE_DEFAULT, lv_color_hex(0xB068DE));
	lv_style_set_border_width(&style_IR_PAGE_cont_1_main_default, LV_STATE_DEFAULT, 1);
	lv_style_set_border_opa(&style_IR_PAGE_cont_1_main_default, LV_STATE_DEFAULT, 255);
	lv_style_set_border_color(&style_IR_PAGE_cont_1_main_default, LV_STATE_DEFAULT, lv_color_hex(0x999999));
	lv_obj_add_style(ui->IR_PAGE_cont_1, LV_CONT_PART_MAIN, &style_IR_PAGE_cont_1_main_default);

	//Widget: IR_PAGE_waitword
	ui->IR_PAGE_waitword = lv_label_create(ui->IR_PAGE_cont_1, NULL);
	lv_label_set_text(ui->IR_PAGE_waitword, "等待接收红外信号");
	lv_label_set_align(ui->IR_PAGE_waitword, LV_LABEL_ALIGN_CENTER);
	lv_obj_set_pos(ui->IR_PAGE_waitword, 43, 192);
	lv_obj_set_width(ui->IR_PAGE_waitword, 170);

	//Set style for IR_PAGE_waitword. Part: LV_LABEL_PART_MAIN, State: LV_STATE_DEFAULT
	static lv_style_t style_IR_PAGE_waitword_main_default;
	lv_style_reset(&style_IR_PAGE_waitword_main_default);
	lv_style_set_radius(&style_IR_PAGE_waitword_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_text_color(&style_IR_PAGE_waitword_main_default, LV_STATE_DEFAULT, lv_color_hex(0x000000));
	lv_style_set_text_font(&style_IR_PAGE_waitword_main_default, LV_STATE_DEFAULT, &lv_font_SourceHanSerifSC_Regular_19);
	lv_style_set_text_letter_space(&style_IR_PAGE_waitword_main_default, LV_STATE_DEFAULT, 2);
	lv_style_set_text_line_space(&style_IR_PAGE_waitword_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_bg_opa(&style_IR_PAGE_waitword_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_top(&style_IR_PAGE_waitword_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_right(&style_IR_PAGE_waitword_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_bottom(&style_IR_PAGE_waitword_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_pad_left(&style_IR_PAGE_waitword_main_default, LV_STATE_DEFAULT, 0);
	lv_style_set_shadow_width(&style_IR_PAGE_waitword_main_default, LV_STATE_DEFAULT, 0);
	lv_obj_add_style(ui->IR_PAGE_waitword, LV_LABEL_PART_MAIN, &style_IR_PAGE_waitword_main_default);

	//Widget: IR_PAGE_waitflag
	ui->IR_PAGE_waitflag = lv_spinner_create(ui->IR_PAGE_cont_1, NULL);
	lv_spinner_set_arc_length(ui->IR_PAGE_waitflag, 60);
	lv_spinner_set_spin_time(ui->IR_PAGE_waitflag, 1000);
	lv_obj_set_pos(ui->IR_PAGE_waitflag, 75, 75);
	lv_obj_set_size(ui->IR_PAGE_waitflag, 100, 100);

	//Set style for IR_PAGE_waitflag. Part: LV_SPINNER_PART_BG, State: LV_STATE_DEFAULT
	static lv_style_t style_IR_PAGE_waitflag_bg_default;
	lv_style_reset(&style_IR_PAGE_waitflag_bg_default);
	lv_style_set_pad_top(&style_IR_PAGE_waitflag_bg_default, LV_STATE_DEFAULT, 5);
	lv_style_set_pad_bottom(&style_IR_PAGE_waitflag_bg_default, LV_STATE_DEFAULT, 5);
	lv_style_set_pad_left(&style_IR_PAGE_waitflag_bg_default, LV_STATE_DEFAULT, 5);
	lv_style_set_pad_right(&style_IR_PAGE_waitflag_bg_default, LV_STATE_DEFAULT, 5);
	lv_style_set_bg_opa(&style_IR_PAGE_waitflag_bg_default, LV_STATE_DEFAULT, 0);
	lv_style_set_line_color(&style_IR_PAGE_waitflag_bg_default, LV_STATE_DEFAULT, lv_color_hex(0xd5d6de));
	lv_style_set_line_width(&style_IR_PAGE_waitflag_bg_default, LV_STATE_DEFAULT, 16);
	lv_style_set_shadow_width(&style_IR_PAGE_waitflag_bg_default, LV_STATE_DEFAULT, 0);
	lv_obj_add_style(ui->IR_PAGE_waitflag, LV_SPINNER_PART_BG, &style_IR_PAGE_waitflag_bg_default);

	//Set style for IR_PAGE_waitflag. Part: LV_SPINNER_PART_INDIC, State: LV_STATE_DEFAULT
	static lv_style_t style_IR_PAGE_waitflag_indic_default;
	lv_style_reset(&style_IR_PAGE_waitflag_indic_default);
	lv_style_set_line_color(&style_IR_PAGE_waitflag_indic_default, LV_STATE_DEFAULT, lv_color_hex(0x68CCED));
	lv_style_set_line_rounded(&style_IR_PAGE_waitflag_indic_default, LV_STATE_DEFAULT, true);
	lv_style_set_line_width(&style_IR_PAGE_waitflag_indic_default, LV_STATE_DEFAULT, 16);
	lv_style_set_line_opa(&style_IR_PAGE_waitflag_indic_default, LV_STATE_DEFAULT, 255);
	lv_obj_add_style(ui->IR_PAGE_waitflag, LV_SPINNER_PART_INDIC, &style_IR_PAGE_waitflag_indic_default);


	//Widget: IR_PAGE_flag
	ui->IR_PAGE_flag = lv_imgbtn_create(ui->IR_PAGE_cont_1, NULL);
	lv_imgbtn_set_checkable(ui->IR_PAGE_flag, true);
	lv_imgbtn_set_src(ui->IR_PAGE_flag, LV_BTN_STATE_RELEASED, &_succec_alpha_100x100);
	lv_imgbtn_set_src(ui->IR_PAGE_flag, LV_BTN_STATE_PRESSED, &_fail_alpha_100x100);
	ui->IR_PAGE_flag_label = lv_label_create(ui->IR_PAGE_flag, NULL);
	lv_label_set_text(ui->IR_PAGE_flag_label, "");
	lv_label_set_align(ui->IR_PAGE_flag_label, LV_LABEL_ALIGN_CENTER);
	lv_obj_set_pos(ui->IR_PAGE_flag, 75, 76);
	lv_obj_set_size(ui->IR_PAGE_flag, 100, 100);
	lv_obj_set_hidden(ui->IR_PAGE_flag, true);

	//Set style for IR_PAGE_flag. Part: LV_IMGBTN_PART_MAIN, State: LV_STATE_DEFAULT
	static lv_style_t style_IR_PAGE_flag_main_default;
	lv_style_reset(&style_IR_PAGE_flag_main_default);
	lv_style_set_image_opa(&style_IR_PAGE_flag_main_default, LV_STATE_DEFAULT, 255);
	lv_style_set_text_color(&style_IR_PAGE_flag_main_default, LV_STATE_DEFAULT, lv_color_hex(0x000000));
	lv_style_set_text_font(&style_IR_PAGE_flag_main_default, LV_STATE_DEFAULT, &lv_font_song_13);
	lv_style_set_shadow_width(&style_IR_PAGE_flag_main_default, LV_STATE_DEFAULT, 0);
	lv_obj_add_style(ui->IR_PAGE_flag, LV_IMGBTN_PART_MAIN, &style_IR_PAGE_flag_main_default);

	//Set style for IR_PAGE_flag. Part: LV_IMGBTN_PART_MAIN, State: LV_STATE_PRESSED
	static lv_style_t style_IR_PAGE_flag_main_pressed;
	lv_style_reset(&style_IR_PAGE_flag_main_pressed);
	lv_style_set_text_color(&style_IR_PAGE_flag_main_pressed, LV_STATE_PRESSED, lv_color_hex(0xFF33FF));
	lv_style_set_text_font(&style_IR_PAGE_flag_main_pressed, LV_STATE_PRESSED, &lv_font_song_13);
	lv_style_set_shadow_width(&style_IR_PAGE_flag_main_pressed, LV_STATE_PRESSED, 0);
	lv_obj_add_style(ui->IR_PAGE_flag, LV_IMGBTN_PART_MAIN, &style_IR_PAGE_flag_main_pressed);

	//Set style for IR_PAGE_flag. Part: LV_IMGBTN_PART_MAIN, State: LV_STATE_CHECKED
	static lv_style_t style_IR_PAGE_flag_main_checked;
	lv_style_reset(&style_IR_PAGE_flag_main_checked);
	lv_style_set_text_color(&style_IR_PAGE_flag_main_checked, LV_STATE_CHECKED, lv_color_hex(0xFF33FF));
	lv_style_set_text_font(&style_IR_PAGE_flag_main_checked, LV_STATE_CHECKED, &lv_font_song_13);
	lv_style_set_shadow_width(&style_IR_PAGE_flag_main_checked, LV_STATE_CHECKED, 0);
	lv_obj_add_style(ui->IR_PAGE_flag, LV_IMGBTN_PART_MAIN, &style_IR_PAGE_flag_main_checked);


	//Init events for screen.
	events_init_IR_PAGE(ui);
}